package com.ruoyi.mechanismType.domain;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 设备类型对象 mechanism_type
 *
 * @author pengjie
 * @date 2023-12-21
 */
public class MechanismType extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private String id;

    /** 设备类型 */
    @Excel(name = "设备类型")
    private String deviceType;

    /** 类型编码 */
    @Excel(name = "类型编码")
    private String deviceTypeCode;

    /** 上级类型ID */
    @Excel(name = "上级类型ID")
    private String parentId;

    /** 创建人 */
    @Excel(name = "创建人")
    private String createByName;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createAt;

    /** 修改人 */
    @Excel(name = "修改人")
    private String updateByName;

    /** 修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updateAt;

    /** 版本 */
    @Excel(name = "版本")
    private String version;

    /** 状态 */
    @Excel(name = "状态")
    private Long status;

    /** 扩展字段1 */
    @Excel(name = "扩展字段1")
    private String extra1;

    /** 扩展字段2 */
    @Excel(name = "扩展字段2")
    private String extra2;

    /** 扩展字段3 */
    @Excel(name = "扩展字段3")
    private String extra3;

    /** 同步时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "同步时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date syncTime;

    /** 子树 */
    @TableField(exist = false)
    private List<MechanismType> children;

    public List<MechanismType> getChildren() {
        return children;
    }

    public MechanismType() {
    }

    public void setChildren(List<MechanismType> children) {
        this.children = children;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }
    public void setDeviceType(String deviceType)
    {
        this.deviceType = deviceType;
    }

    public String getDeviceType()
    {
        return deviceType;
    }
    public void setDeviceTypeCode(String deviceTypeCode)
    {
        this.deviceTypeCode = deviceTypeCode;
    }

    public String getDeviceTypeCode()
    {
        return deviceTypeCode;
    }
    public void setParentId(String parentId)
    {
        this.parentId = parentId;
    }

    public String getParentId()
    {
        return parentId;
    }
    public void setCreateByName(String createByName)
    {
        this.createByName = createByName;
    }

    public String getCreateByName()
    {
        return createByName;
    }
    public void setCreateAt(Date createAt)
    {
        this.createAt = createAt;
    }

    public Date getCreateAt()
    {
        return createAt;
    }
    public void setUpdateByName(String updateByName)
    {
        this.updateByName = updateByName;
    }

    public String getUpdateByName()
    {
        return updateByName;
    }
    public void setUpdateAt(Date updateAt)
    {
        this.updateAt = updateAt;
    }

    public Date getUpdateAt()
    {
        return updateAt;
    }
    public void setVersion(String version)
    {
        this.version = version;
    }

    public String getVersion()
    {
        return version;
    }
    public void setStatus(Long status)
    {
        this.status = status;
    }

    public Long getStatus()
    {
        return status;
    }
    public void setExtra1(String extra1)
    {
        this.extra1 = extra1;
    }

    public String getExtra1()
    {
        return extra1;
    }
    public void setExtra2(String extra2)
    {
        this.extra2 = extra2;
    }

    public String getExtra2()
    {
        return extra2;
    }
    public void setExtra3(String extra3)
    {
        this.extra3 = extra3;
    }

    public String getExtra3()
    {
        return extra3;
    }
    public void setSyncTime(Date syncTime)
    {
        this.syncTime = syncTime;
    }

    public Date getSyncTime()
    {
        return syncTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("deviceType", getDeviceType())
            .append("deviceTypeCode", getDeviceTypeCode())
            .append("parentId", getParentId())
            .append("createBy", getCreateBy())
            .append("createByName", getCreateByName())
            .append("createAt", getCreateAt())
            .append("updateBy", getUpdateBy())
            .append("updateByName", getUpdateByName())
            .append("updateAt", getUpdateAt())
            .append("remark", getRemark())
            .append("version", getVersion())
            .append("status", getStatus())
            .append("extra1", getExtra1())
            .append("extra2", getExtra2())
            .append("extra3", getExtra3())
            .append("syncTime", getSyncTime())
            .toString();
    }
}
